package com.my.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.my.domain.MyPerformance;
import com.my.mapper.MyPerformanceMapper;
import com.my.vo.PerformanceVo;
import org.springframework.stereotype.Service;

@Service
public class MyPerformanceService extends ServiceImpl<MyPerformanceMapper, MyPerformance> {


    public PerformanceVo performanceDetail(String id) {
        return baseMapper.selectPaperPerformance(new QueryWrapper<>(MyPerformance.class)
                .eq("pe.paper_id", id));
    }

    public void performanceDeleted(String id) {
        removeById(id);
    }

    public void performanceEdit(MyPerformance myPerformance) {
        saveOrUpdate(myPerformance);
    }
}
